<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="shortcut icon" href="__PUBLIC__/favicon.ico" type="image/x-icon" />
    <title>小木鱼博客后台管理系统</title>
    <link rel="stylesheet" href="__PUBLIC__/layui/css/layui.css">
    <style type="text/css">
        .layui-nav-side{
            top: 60px;
        }
        .nav_toggle{
            position: absolute;
            left: 200px;
            height: 100%;
            line-height: 60px;
        }
        .warpper { 
            overflow: auto; 
            -webkit-overflow-scrolling: touch; 
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            z-index: 1;
        }
        .warpper > iframe {
            position: absolute;
            bottom: 0;
            height: 100%;
            width: 100%;
        }
        @media screen and (max-width:1024px) {
            .layui-nav .layui-nav-item a > b{
                display: none;
            }
        }
    </style>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
    <div class="layui-header">
        <div class="layui-logo">后台管理系统</div>
        <div class="nav_toggle open">
          <div class="layui-btn">A</div>
        </div>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href="javascript:;">
                  <!-- <img src="/uploads/admin/{$user.header}" class="layui-nav-img"> -->
                  <b>{$admin.nickname}</b>
                </a>
                <dl class="layui-nav-child">
                  <dd><a href="javascript:;" class="editinfo">修改信息</a></dd>
                  <dd><a href="javascript:;" class="editpwd">修改密码</a></dd>
                  <dd><a href="{:U('Admin/Admin/logout')}">退了</a></dd>
                </dl>
            </li>
        </ul>
    </div>
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree">
                <li class="layui-nav-item layui-this"><a href="{:U('/admin')}">后台首页</a></li>
                <li class="layui-nav-item">
                    <a href="javascript:;">权限管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="{:U('Admin/AuthRule/index')}" target='main'>规则列表</a></dd>
                        <dd><a href="{:U('Admin/AuthGroup/index')}" target='main'>用户组列表</a></dd>
                        <dd><a href="{:U('Admin/Admin/index')}" target='main'>管理员列表</a></dd>
                        <dd><a href="{:U('Admin/Admin/log')}" target='main'>管理员日志</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="{:U('Admin/Category/index')}" target='main'>分类管理</a>
                </li>
                <li class="layui-nav-item">
                    <a href="javascript:;">文章管理</a>
                    <dl class="layui-nav-child">
                        <dd><a href="{:U('Admin/Article/index')}" target='main'>审核通过的文章</a></dd>
                        <dd><a href="{:U('Admin/Article/waitList')}" target='main'>待审核的文章</a></dd>
                        <dd><a href="{:U('Admin/Article/noPassList')}" target='main'>审核不通过的文章</a></dd>
                        <dd><a href="{:U('Admin/Article/huishou')}" target='main'>回收站</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item">
                    <a href="{:U('Admin/User/index')}" target='main'>用户管理</a>
                </li>
                <li class="layui-nav-item">
                    <a href="{:U('Admin/Comment/index')}" target='main'>留言管理</a>
                </li>
                <li class="layui-nav-item">
                    <a href="{:U('Admin/Group/index')}" target='main'>圈子管理</a>
                </li>
            </ul>
        </div>
    </div>
  
    <div class="layui-body" style="overflow: hidden;">
      <div class="warpper">
        <!-- 内容主体区域 -->
        <iframe src="{:U('Admin/Index/main')}" id="main" name="main" frameborder="0" scrolling="yes"></iframe>
      </div>
    </div>
  
    <div class="layui-footer">
        © www.birongsen.com - 底部固定区域
    </div>
</div>
<script type="text/javascript" src="__PUBLIC__/layui/layui.js"></script>
<script>
layui.use(['element','jquery','layer'], function(){
    var element = layui.element,
        layer = layui.layer,
        $ = layui.jquery;
    $("#main").height($(window).height()-104);
    $(".editpwd").on('click',function(){
        layer.open({
            type: 2,
            title:'修改密码',
            area: ['400px', '170px'],
            content:"{:U('Admin/Admin/editpwd')}?admin_id="+{$admin.admin_id}
        });
    });
    $(".editinfo").on('click',function(){
        layer.open({
            type: 2,
            title:'修改管理员信息',
            area: ['400px', '400px'],
            content:"{:U('Admin/Admin/edit')}?admin_id="+{$admin.admin_id}
        });
    });
    $(".nav_toggle").on("click",function(){
        var i = $(this).attr("class").indexOf("open");
        if( i>0 ){
          $(this).removeClass("open")
          $(".layui-side").animate({
            'left':'-200px',
          })
          $(".layui-body").animate({
            'left':'0px',
          })
          $(".layui-layout-admin .layui-footer").animate({
            'left':'0px',
          })
        }else{
          $(this).addClass("open")
          $(".layui-side").animate({
            'left':'0px',
          })
          $(".layui-body").animate({
            'left':'200px',
          })
          $(".layui-layout-admin .layui-footer").animate({
            'left':'200px',
          })
        }
      });
});
</script>
</body>
</html>